package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author aiden
 * @date 2024/2/14 00:33
 */

@Mapper
public interface SetmealDishMapper {
    /**
     * 根据菜品id查询对应的套餐id
     * select setmeal_id from setmeal_dish where dish_id in (dishIds)
     */
    public List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    void saveInBatch(List<SetmealDish> list);

    List<SetmealDish> getBySetmealId(Long setmealId);

    void deleteBySetmealIdInBatch(List<Long> setmealIds);

    void deleteBySetmealIds(List<Integer> ids);

}
